import Vue from 'vue'
import moment from 'moment'
moment.locale('zh-cn')
const obj = {
  formatDate: time => {
    return moment(time).fromNow()
  },
  testFilter (str) {
    return 'filters : ' + str
  }
}

Object.keys(obj).forEach(key => {
  Vue.filter(key, obj[key])
})
